package cn.neusoft.annodi;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service   //服务层
public class UserService {

//    @Autowired   //自动装配容器中对应的对象
    @Resource
    UserDao userDao;

    public void add(){
        System.out.println("UserService注解方式---add");
        userDao.add();
    }

}
